package models;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.Id;

import play.data.validation.Constraints.Required;
import play.db.ebean.Model;
import play.db.ebean.Model.Finder;

@Entity
public class EmployeeType extends Model {

	/**
	 * 
	 */
	private static final long serialVersionUID = -697929498550686470L;

	@Id
	public Long id;

	@Required
	public String code;

	public EmployeeType(Long id, String code) {
		this.id = id;
		this.code = code;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
 
	public static Finder<Long, EmployeeType> find = new Finder<Long, EmployeeType>(Long.class, EmployeeType.class);

	/* Just to make sure */
	public static List<EmployeeType> list() {
		return find.all();
	}
}
